<h4 translate>Task Details</h4>

<dl class="dl-horizontal dl-horizontal-left">
  <dt translate>Action Type</dt>
  <dd>{{ task.humanized.action }}</dd>

  <dt translate>User</dt>
  <dd>{{ task.username }}</dd>

  <dt translate>Started At</dt>
  <dd><short-date-time date="task.started_at" /></dd>

  <dt translate>Finished At</dt>
  <dd><short-date-time date="task.ended_at" /></dd>

  <dt translate>Parameters</dt>
  <dd ng-switch="isArray(task.humanized.input)">
    <span ng-switch-when="true">
      <span ng-repeat="inputPart in task.humanized.input">
        <span task-input-part  data="inputPart"></span>
        <span ng-show="!$last">; </span>
      </span>
    </span>
    <span ng-switch-default>{{task.humanized.input}}</span>
  </dd>

  <dt translate>State</dt>
  <dd>{{ task.state }}</dd>

  <dt translate>Result</dt>
  <dd>
    <i class="fa fa-spinner fa-spin" ng-show="task.pending"></i>
    {{ task.result }}

    <div class="row">
      <div class="col-sm-8">
        <div ng-class="{ active: (task.state === 'pending' || task.state === 'running') }" class="progress progress-striped">
          <span uib-progressbar animate="false" value="task.progressbar.value" type="{{task.progressbar.type}}"></span>
        </div>
      </div>
    </div>
  </dd>

  <dt ng-show="task.humanized.output.length > 0" translate>Details</dt>
  <dd ng-show="task.humanized.output.length > 0">
    <div class="row">
      <div class="col-sm-8">
        <pre>{{ task.humanized.output }}</pre>
      </div>
    </div>
  </dd>
</dl>

 <a href="/foreman_tasks/tasks/{{task.id}}">
   {{ "More Details" | translate }}
 </a>

